<template>
  <el-form
    ref="ruleFormRef"
    :model="ruleForm"
    :rules="rules"
    label-width="auto"
    hide-required-asterisk>
    <div class="card">
      <div class="card-header">
        <div class="common-left-title">线下接收</div>
        <el-button plain @click="">保存</el-button>
      </div>
      <div class="card-content">
        <el-form-item label="接收方式" prop="receiveMode">
          <!-- <el-radio-group v-model="ruleForm.receiveMode">
            <el-radio :value="true">邮寄</el-radio>
          </el-radio-group> -->
          邮寄
        </el-form-item>
        <el-form-item label="收件人" prop="name">
          <el-input v-model.trim="ruleForm.name" placeholder="请输入收件人姓名" />
        </el-form-item>
        <el-form-item label="联系方式" prop="phone">
          <el-input v-model.trim="ruleForm.phone" placeholder="请输入收件人联系方式" />
        </el-form-item>
        <el-form-item label="收件地址" prop="address">
          <el-input v-model.trim="ruleForm.address" placeholder="请输入收件地址" />
        </el-form-item>
      </div>
    </div>
    <div class="card">
      <div class="card-header">
        <div class="common-left-title">线上接收</div>
        <el-button plain @click="">保存</el-button>
      </div>
      <div class="card-content">
        <el-form-item label="接收方式" prop="lineMode">
          <!-- <el-radio-group v-model="ruleForm.lineMode">
            <el-radio :value="true">电子邮箱</el-radio>
          </el-radio-group> -->
          电子邮箱
        </el-form-item>
        <el-form-item label="邮件地址" prop="mail">
          <el-input v-model.trim="ruleForm.mail" placeholder="请输入邮件地址" />
        </el-form-item>
      </div>
    </div>
  </el-form>
</template>

<script setup>
const ruleForm = reactive({
  // 线下接收方式
  receiveMode: '',
  // 收件人
  name: '',
  // 联系方式
  phone: '',
  // 收件地址
  address: '',
  // 线上接收方式
  lineMode: '',
  // 邮件地址
  mail: '',
})
const rules = reactive({

})
</script>

<style lang="scss" scoped>
.card{
  & + &{
    margin-top: 20px;
  }
  &-header{
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    .common-left-title{
      --subtitle-text-color: var(--color-type);
      --subtitle-line-color: var(--color-type);
      margin-right: 20px;
    }
  }
  &-content{
    margin-left: 20px;
  }
}

:deep(.el-form-item){
  .el-form-item__label,
  .el-form-item__content{
    color: var(--color-type);
  }
  .el-form-item__content{
    max-width: 500px;
  }
}
</style>
